<!--_meta 作为公共模版分离出去-->
{include file="public/header"}
<!--/meta 作为公共模版分离出去-->

<title>添加管理员</title>
<meta name="keywords" content="">
<meta name="description" content="">
</head>
<body style="background-color:#fff">
<div class="wap-container">

    <div class="panel">
        <div class="panel-body">
            <form action="" method="post" class="form form-horizontal" id="form-admin-add">

<!--                <div class="row clearfix">-->
<!--                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>首页按钮：</label>-->
<!--                    <div class="form-controls col-xs-8 col-sm-9">-->
<!--                        <input type="text" class="input-text" value="{$setting.index_menu}" placeholder="" id="index_menu" name="index_menu">-->
<!--                    </div>-->
<!--                </div>-->


                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>首页LOGO：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div id="fileList" class="uploader-list"><img id="logo_view" width=80px border=0 src='{$setting.index_logo}'></div>
                            <div><input type="file" name="index_logo" id="file_upload_logo"></div>
                        </div>
                    </div>
                </div>

<!--                <div class="row clearfix">-->
<!--                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>首页图片：</label>-->
<!--                    <div class="form-controls col-xs-8 col-sm-9">-->
<!--                        <div class="uploader-thum-container">-->
<!--                            <div class="uploader-list"><img id="index_image_view" width=120px border=0 src='{$setting.index_image}'></div>-->
<!--                            <div><input type="file" name="index_image" id="file_upload_index_image"></div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>关于七星优购：</label>
                    <div class="form-controls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$setting.footer_about}" placeholder="" id="footer_about" name="footer_about">
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>关于我们：</label>
                    <div class="form-controls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$setting.footer_about_we}" placeholder="" id="footer_about_we" name="footer_about_we">
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>公司地址：</label>
                    <div class="form-controls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$setting.address}" placeholder="" id="address" name="address">
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>联系电话：</label>
                    <div class="form-controls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$setting.phone}" placeholder="" id="phone" name="phone">
                    </div>
                </div>

                <div class="row clearfix">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>招聘信息：</label>
                    <div class="form-controls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$setting.job_info}" placeholder="" id="job_info" name="job_info">
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>公众号：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="wxgzh_view" width=80px border=0 src='{$setting.wxgzh}'></div>
                            <div><input type="file" name="wxgzh" id="file_upload_wxgzh"></div>
                        </div>
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>APP：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="app_view" width=80px border=0 src='{$setting.app}'></div>
                            <div><input type="file" name="app" id="file_upload_app"></div>
                        </div>
                    </div>
                </div>


                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>小程序：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="wxxcx_view" width=80px border=0 src='{$setting.wxxcx}'></div>
                            <div><input type="file" name="wxxcx" id="file_upload_wxxcx"></div>
                        </div>
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>微博：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="wb_view" width=80px border=0 src='{$setting.wb}'></div>
                            <div><input type="file" name="wb" id="file_upload_wb"></div>
                        </div>
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>QQ：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="qq_view" width=80px border=0 src='{$setting.qq}'></div>
                            <div><input type="file" name="qq" id="file_upload_qq"></div>
                        </div>
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>微信：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <div class="uploader-thum-container">
                            <div class="uploader-list"><img id="wx_view" width=80px border=0 src='{$setting.wx}'></div>
                            <div><input type="file" name="wx" id="file_upload_wx"></div>
                        </div>
                    </div>
                </div>

                <input type="hidden" name="id" value="{$setting.id}">
                <div class="row clearfix">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                        <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
{include file="public/footer"}
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/static/admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
    $(function(){
        /* 通过iCheck插件，美化checkbox */
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        /* 表单验证，提交 */
        $("#form-admin-add").validate({
            rules:{
                account:{
                    required:true,
                    minlength:4,
                    maxlength:16
                },
                password:{
                    required:true,
                },
                password2:{
                    required:true,
                    equalTo: "#password"
                },


            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            submitHandler:function(form){
                $(form).ajaxSubmit({
                    type: 'post',
                    url: "{:url('executeData')}" ,
                    success: function(res){
                        layer.msg(res.msg, {icon:6,time:1000});
                    }
                });
            }
        });
    });
</script>
<script>
    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_logo").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#logo_view").attr("src",dataURL);
        });
    });
    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_index_image").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#index_image_view").attr("src",dataURL);
        });
    });
    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_wxgzh").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#wxgzh_view").attr("src",dataURL);
        });
    });

    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_app").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#app_view").attr("src",dataURL);
        });
    });

    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_wxxcx").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#wxxcx_view").attr("src",dataURL);
        });
    });

    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_wb").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#wb_view").attr("src",dataURL);
        });
    });

    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_qq").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#qq_view").attr("src",dataURL);
        });
    });

    $(function() {
        /*原理是把本地图片路径："D(盘符):/image/..."转为"http://..."格式路径来进行显示图片*/
        $("#file_upload_wx").change(function() {
            var $file = $(this);
            var objUrl = $file[0].files[0];
            //获得一个http格式的url路径:mozilla(firefox)||webkit or chrome
            var windowURL = window.URL || window.webkitURL;
            //createObjectURL创建一个指向该参数对象(图片)的URL
            var dataURL;
            dataURL = windowURL.createObjectURL(objUrl);
            $("#wx_view").attr("src",dataURL);
        });
    });


</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
